<#include "header.htm"/>

<div id="tabs">
			<ul>
				<li><a href="${JForumContext.encodeURL("/admBase/login")}"><span>${I18n.getMessage("Admin.general")}</span></a></li>
	
			
				<li><a href="${contextPath}/adminGroups/list${extension}"><span>${I18n.getMessage("Admin.groups")}</span></a></li>
				<li><a href="${contextPath}/adminUsers/list${extension}"><span>${I18n.getMessage("Admin.users")}</span></a></li>
				<li><a href="${contextPath}/adminCategories/list${extension}"><span>${I18n.getMessage("Admin.categories")}</span></a></li>				
				<li><a href="${contextPath}/adminForums/list${extension}"><span>${I18n.getMessage("Admin.forums")}</span></a></li>
				<li><a href="${contextPath}/adminModeration/list${extension}"><span>${I18n.getMessage("Admin.approving")}</span></a></li>
			
				<li><a href="${contextPath}/adminRankings/list${extension}"><span>${I18n.getMessage("Admin.rankings")}</span></a></li>				
				<li><a href="${contextPath}/adminBanning/list${extension}"><span>${I18n.getMessage("Admin.banning")}</span></a></li>
				
				
				
				
				<li id="activetab"><a href="${contextPath}/adminConfig/list${extension}"><span>${I18n.getMessage("Admin.configurations")}</span></a></li>
			
				<li><a href="${contextPath}/adminSmilies/list${extension}"><span>${I18n.getMessage("Admin.smilies")}</span></a></li>
			
				<li><a href="${contextPath}/adminSearchStats/list${extension}"><span>${I18n.getMessage("Admin.search")}</span></a></li>
			
				<li><a href="${contextPath}/adminAttachments/configurations${extension}"><span>${I18n.getMessage("Admin.attachments")}</span></a></li>
			
				<li><a href="${contextPath}/adminCache/list${extension}"><span>${I18n.getMessage("Admin.cache")}</span></a></li>
			
			</ul>
</div>




<div id="acp">
		<div class="panel">
			<span class="corners-top"><span></span></span>
				<div id="content">

<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/jquery.js?${startupTime}"></script>

<script type="text/javascript">
<#include "../js/utils.js"/>
</script>

<script language="javascript">
function resize()
{
	var h = document.form.thumbH.value;
	var w = document.form.thumbW.value;
	
	if ((h > 30 && h < 350) && (w > 30 && w < 350)){
		document.getElementById("avatarPreview").style.width = w + "px";                   
		document.getElementById("avatarPreview").style.height = h + "px";          
	}
}

function changeValue(field, value)
{
	var f = eval("document.form." + field)
	f.value = value;
	resize();
}

function testEmail()
{
	if ($("#address").val()) {
		$("#mailButton").val("${I18n.getMessage("Config.Form.SmtpTestSending")}...").attr("disabled", "disabled");

		var params = {
			sender: $("#sender").val(),
			host: $("#host").val(),
			port: $("#port").val(),
			auth: $("#auth").val(),
			ssl: $("#ssl").val(),
			username: $("#username").val(),
			password: $("#password").val(),
			to: $("#address").val()
		};

		$.ajax({
			type:"POST",
			url:"$contextPath/jforum${extension}?module=ajax&action=sendTestMail",
			data:params,
			dataType:"script",
			global:false
		});
	}
}
</script>

<form accept-charset="${encoding}" name="form" action="${contextPath}/jforum${extension}" method="post">
<input type="hidden" name="action" value="editSave" />
<input type="hidden" name="module" value="${moduleName}" />

<h1>${I18n.getMessage("AdminConfig.Title")}</h1>

<fieldset>
		<legend>${I18n.getMessage("Config.Form.General")}</legend>
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.ForumURL")}:</label></dt>
		<dd><input type="text" size="50" name="p_forum.link" value="${config.getProperty("forum.link")}" /></dd>
	</dl>
	
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.SiteURL")}:</label></dt>
		<dd><input type="text" size="50" name="p_homepage.link" value="${config.getProperty("homepage.link")}" /></dd>
	</dl>
		
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.forumName")}:</label></dt>
		<dd><input type="text" size="50" name="p_forum.name" value="${config.getProperty("forum.name")}" /></dd>
	</dl>		

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.ForumPageTitle")}:</label></dt>
		<dd><input type="text" size="50" name="p_forum.page.title" value="${config.getProperty("forum.page.title")}" /></dd>
	</dl>		

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.MetaTag.description")}:</label></dt>
		<dd><input type="text" size="50" name="p_forum.page.metatag.description" value="${config.getProperty("forum.page.metatag.description")}" /></dd>
	</dl>		

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.MetaTag.keywords")}:</label></dt>
		<dd><input type="text" size="50" name="p_forum.page.metatag.keywords" value="${config.getProperty("forum.page.metatag.keywords")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.encoding")}:</label></dt>
		<dd><input type="text" size="10" name="p_encoding" value="${config.getProperty("encoding")}" /></dd>
	</dl>


	<dl>
		<dt><label>${I18n.getMessage("Config.Form.I18n")}:</label></dt>
		<dd>
		<select name="p_i18n.board.default">
		<#list locales as l>
			<#assign selected = ""/>
			<#if l == config.getProperty("i18n.board.default")>
				<#assign selected = "selected"/>
			</#if>

			<option value="${l}" ${selected}>${l}</option>
		</#list>
		</select>
		</dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.TopicsPerPage")}:</label></dt>
		<dd><input type="text" size="10" name="p_topicsPerPage" value="${config.getProperty("topicsPerPage")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.PostsPerPage")}:</label></dt>
		<dd><input type="text" size="10" name="p_postsPerPage" value="${config.getProperty("postsPerPage")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.UsersPerPage")}:</label></dt>
		<dd><input type="text" size="10" name="p_usersPerPage" value="${config.getProperty("usersPerPage")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.postsNewDelay")}:</label></dt>
		<dd><input type="text" size="10" name="p_posts.new.delay" value="${config.getProperty("posts.new.delay")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.htmlTags")}:</label></dt>
		<dd><input type="text" size="50" name="p_html.tags.welcome" value="${config.getProperty("html.tags.welcome")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.CaptchaDuringRegistration")}:</label></dt>
		<dd>
		   	<#assign o = config.getProperty("captcha.registration")/>
			<select name="p_captcha.registration">
				<option value="true" <#if o == "true">selected</#if>>${I18n.getMessage("True")}</option>
				<option value="false" <#if o == "false">selected</#if>>${I18n.getMessage("False")}</option>
			</select>
		
		</dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.DisableRegistraion")}:</label></dt>
		<dd>
		    <#assign o = config.getProperty("registration.enabled")/>
			<select name="p_registration.enabled">
				<option value="true" <#if o == "true">selected</#if>>${I18n.getMessage("True")}</option>
				<option value="false" <#if o == "false">selected</#if>>${I18n.getMessage("False")}</option>
			</select>
		
		</dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.EnableRSS")}:</label></dt>
		<dd>
		    <#assign o = config.getProperty("rss.enabled")/>
			<select name="p_rss.enabled">
				<option value="true" <#if o == "true">selected</#if>>${I18n.getMessage("True")}</option>
				<option value="false" <#if o == "false">selected</#if>>${I18n.getMessage("False")}</option>
			</select>
		
		</dd>
	</dl>

		
</fieldset>


<fieldset>
		<legend>${I18n.getMessage("Config.Form.cacheSettings")}</legend>
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.postsCacheEnabled")}:</label></dt>
		<dd>
		<#assign o = config.getProperty("posts.cache.enabled")/>
		<select name="p_posts.cache.enabled">
			<option value="true" <#if o == "true">selected</#if>>${I18n.getMessage("True")}</option>
			<option value="false" <#if o == "false">selected</#if>>${I18n.getMessage("False")}</option>
		</select>
		</dd>
	</dl>
	
		
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.postsCacheSize")}:</label></dt>
		<dd><input type="text" size="10" name="p_posts.cache.size" value="${config.getProperty("posts.cache.size")}" /></dd>
	</dl>
	
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.HotTopicStart")}:</label></dt>
		<dd><input type="text" size="10" name="p_hot.topic.begin" value="${config.getProperty("hot.topic.begin")}" /></dd>
	</dl>
	
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.RecentTopicsLimit")}:</label></dt>
		<dd><input type="text" size="10" name="p_topic.recent" value="${config.getProperty("topic.recent")}" /></dd>
	</dl>
	

</fieldset>

<fieldset>
		<legend>${I18n.getMessage("Config.Form.avatar")}</legend>
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.avatarSize")}:</label></dt>
		<dd><input type="text" size="10" name="p_avatarMaxKbSize" value="${config.getProperty("avatarMaxKbSize")}" /></dd>
	</dl>
	
		
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.avatarMaxWidth")}:</label></dt>
		<dd><input type="text" size="10"name="p_avatar.maxWidth" value="${config.getProperty("avatar.maxWidth")}" onchange="changeValue('thumbW', this.value)"/></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.avatarMaxHeight")}:</label></dt>
		<dd><input type="text" size="10"name="p_avatar.maxHeight" value="${config.getProperty("avatar.maxHeight")}" onchange="changeValue('thumbH', this.value)"/></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.avatarPreview")}:</label></dt>
		<dd>
		<input type="hidden" name="thumbH" value="${config.getProperty("avatar.maxHeight")}">	
		<input type="hidden" name="thumbW" value="${config.getProperty("avatar.maxWidth")}">
		<div id="avatarPreview" style="align:center; border:1px solid orange;">&nbsp;</div>
		</dd>
	</dl>


</fieldset>




<fieldset>
		<legend>${I18n.getMessage("Config.Form.Mail")}</legend>
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.Charset")}:</label></dt>
		<dd><input type="text" size="10" name="p_mail.charset" value="${config.getProperty("mail.charset")}" /></dd>
	</dl>
	
		
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.Sender")}:</label></dt>
		<dd><input type="text" size="50" name="p_mail.sender" id="sender" value="${config.getProperty("mail.sender")}" /></dd>
	</dl>
	
	
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.MailHost")}:</label></dt>
		<dd><input type="text" size="50" name="p_mail.smtp.host" id="host" value="${config.getProperty("mail.smtp.host")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.MailPort")}:</label></dt>
		<dd><input type="text" size="10" name="p_mail.smtp.port" id="port" value="${config.getProperty("mail.smtp.port")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.SmtpAuth")}:</label></dt>
		<dd>
		<select name="p_mail.smtp.auth" id="auth">
			<option value="false" <#if config.getProperty("mail.smtp.auth") == "false">selected</#if>>${I18n.getMessage("False")}</option>
			<option value="true" <#if config.getProperty("mail.smtp.auth") == "true">selected</#if>>${I18n.getMessage("True")}</option>
		</select>
		
		</dd>
	</dl>	

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.MailSSL")}:</label></dt>
		<dd>
		<select name="p_mail.smtp.ssl" id="ssl">
			<option value="false" <#if config.getProperty("mail.smtp.ssl") == "false">selected</#if>>${I18n.getMessage("False")}</option>
			<option value="true" <#if config.getProperty("mail.smtp.ssl") == "true">selected</#if>>${I18n.getMessage("True")}</option>
		</select>
		
		</dd>
	</dl>	


	<dl>
		<dt><label>${I18n.getMessage("Config.Form.SmtpUsername")}:</label></dt>
		<dd><input type="text" size="50" name="p_mail.smtp.username" id="username" value="${config.getProperty("mail.smtp.username")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.SmtpPassword")}:</label></dt>
		<dd><input type="password" name="p_mail.smtp.password" id="password" value="${config.getProperty("mail.smtp.password")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.SmtpTest")}:</label></dt>
		<dd>
		    <span>E-mail: </span> <input type="text" id="address">&nbsp;	<input type="button" value="${I18n.getMessage("Config.Form.SmtpTest")}" class="mainoption" id="mailButton" onClick="testEmail();">
		 </dd>
	</dl>
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.AnswerFile")}:</label></dt>
		<dd><input type="text" size="50" name="p_mail.newAnswer.messageFile" value="${config.getProperty("mail.newAnswer.messageFile")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.AnswerSubject")}:</label></dt>
		<dd><input type="text" size="50" name="p_mail.newAnswer.subject" value="${config.getProperty("mail.newAnswer.subject")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.PmAnswerFile")}:</label></dt>
		<dd><input type="text" size="50" name="p_mail.newPm.messageFile" value="${config.getProperty("mail.newPm.messageFile")}" /></dd>
	</dl>
	
		
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.PmAnswerSubject")}:</label></dt>
		<dd><input type="text" size="50" name="p_mail.newPm.subject" value="${config.getProperty("mail.newPm.subject")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.ActivationAnswerFile")}:</label></dt>
		<dd><input type="text" size="50" name="p_mail.activationKey.messageFile" value="${config.getProperty("mail.activationKey.messageFile")}" /></dd>
	</dl>
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.ActivationAnswerSubject")}:</label></dt>
		<dd><input type="text" size="50" name="p_mail.activationKey.subject" value="${config.getProperty("mail.activationKey.subject")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.LostPasswordFile")}:</label></dt>
		<dd><input type="text" size="50" name="p_mail.lostPassword.messageFile" value="${config.getProperty("mail.lostPassword.messageFile")}" /></dd>
	</dl>
	
		
	<dl>
		<dt><label>${I18n.getMessage("Config.Form.LostPasswordSubject")}:</label></dt>
		<dd><input type="text" size="50" name="p_mail.lostPassword.subject" value="${config.getProperty("mail.lostPassword.subject")}" /></dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.MessageFormat")}:</label></dt>
		<dd>
		<select name="p_mail.messageFormat">
			<option value="text" <#if config.getProperty("mail.messageFormat") == "text">selected</#if>>Text</option>
			<option value="html" <#if config.getProperty("mail.messageFormat") == "html">selected</#if>>HTML</option>
		</select>
		
		</dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.EmailNotifyAnswers")}:</label></dt>
		<dd>
		<select name="p_mail.notify.answers">
			<option value="false" <#if config.getProperty("mail.notify.answers") == "false">selected</#if>>${I18n.getMessage("False")}</option>
			<option value="true" <#if config.getProperty("mail.notify.answers") == "true">selected</#if>>${I18n.getMessage("True")}</option>
		</select>
		
		</dd>
	</dl>

	<dl>
		<dt><label>${I18n.getMessage("Config.Form.UserEmailAuth")}:</label></dt>
		<dd>

		<select name="p_mail.user.email.auth">
			<option value="false" <#if config.getProperty("mail.user.email.auth") == "false">selected</#if>>${I18n.getMessage("False")}</option>
			<option value="true" <#if config.getProperty("mail.user.email.auth") == "true">selected</#if>>${I18n.getMessage("True")}</option>
		</select>
		
		</dd>
	</dl>



</fieldset>


<fieldset class="submit-buttons">
		<input class="button1" type="submit" value="${I18n.getMessage("Update")}" name="submit">
</fieldset>



</form>
<script language="javascript">resize();</script>

</div>
	<span class="corners-bottom"><span></span></span>
</div>
</div>

<#include "bottom.htm"/>
